package com.hangxin.commons.util;

public class SysUtil {

public static String setMime(String type){
    	
    	String mime="";
    	if("pdf".equalsIgnoreCase(type)){
    		mime = "application/pdf";
    	}
    	if("doc".equalsIgnoreCase(type)){
    		mime = "application/msword";
    	}
    	if("png".equalsIgnoreCase(type)){
    		mime = "image/png";
    	}
    	if("gif".equalsIgnoreCase(type)){
    		mime = "image/gif";
    	}
    	if("jpeg".equalsIgnoreCase(type)){
    		mime = "image/jpeg";
    	}
    	if("jpg".equalsIgnoreCase(type)){
    		mime = "image/jpeg";
    	}
    	if("rar".equalsIgnoreCase(type)){
    		mime = "application/x-tar";
    	}
    	if("bmp".equalsIgnoreCase(type)){
    		mime = "image/jpeg";
    	}
    	if("bmp".equalsIgnoreCase(type)){
    		mime = "image/jpeg";
    	}
    	if("xls".equalsIgnoreCase(type)){
    		mime = "application/vnd.ms-excel";
    	}
    	if("ppt".equalsIgnoreCase(type)){
    		mime = "application/vnd.ms-powerpoint";
    	}
    	if("txt".equalsIgnoreCase(type)){
    		mime = "text/plain";
    	}
    	return mime;
    }
}
